/* ======================================= */
/* OPENSOURCE.CSS                          */
/* ======================================= */

.opensource-section {
  padding: 2rem;
}

.opensource-section h1 {
  font-size: 2.5rem;
  color: var(--link-color);
  margin-bottom: 0.5rem;
  text-align: center;
}

.opensource-section .intro {
  text-align: center;
  color: #aeb5be;
  font-size: 1.1rem;
  line-height: 1.8;
  letter-spacing: 0.01rem;
  margin-bottom: 3rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.opensource-section .intro b {
  color: var(--link-color);
  font-weight: 600;
}

.category-group {
  margin-bottom: 4rem;
}

.category-title {
  font-size: 1.6rem;
  color: var(--text-color);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
  display: flex;
  align-items: center;
}

.opensource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* ======================================= */
/* Open Source Cards - dezelfde “rijke” look */
/* ======================================= */
a.opensource-card {
  display: flex !important;
  flex-direction: column;
  align-items: center;

  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  text-decoration: none !important;
  outline: none !important;
  color: inherit !important;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  height: 100%;
  cursor: pointer;

  /* minder flets: subtiele gradient + diepte */
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.035),
    rgba(255, 255, 255, 0.015) 55%,
    rgba(0, 0, 0, 0) 100%
  );
  border: 1px solid color-mix(in srgb, #ffffff 10%, var(--border-color));
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

a.opensource-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  border-color: var(--link-color);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.02) 55%,
    rgba(0, 0, 0, 0) 100%
  );
}

a.opensource-card:hover img {
  transform: scale(1.1);
  filter: drop-shadow(0 0 10px var(--link-color));
  transition: all 0.3s ease;
}

a.opensource-card img {
  width: 70px;
  height: 70px;
  margin-bottom: 1.5rem;
  object-fit: contain;
  transition: transform 0.3s ease, filter 0.3s ease;
}

a.opensource-card:active {
  transform: translateY(-2px) scale(0.98);
  background: rgba(0, 0, 0, 0.5);
  transition: all 0.1s ease;
}

a.opensource-card h3 {
  font-size: 1.3rem;
  color: var(--link-color) !important;
  margin-bottom: 1rem;
  margin-top: 0;
}

a.opensource-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #b5bcc5 !important;
  margin: 0;
  flex-grow: 1;
}

a.opensource-card:visited,
a.opensource-card:active,
a.opensource-card:focus {
  color: inherit !important;
  text-decoration: none !important;
}

/* Footnote */
.opensource-section .footnote {
  text-align: center;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: #aeb5be;
  font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 768px) {
  .opensource-section {
    padding: 1rem;
  }

  .opensource-section h1 {
    font-size: 1.8rem;
  }

  .category-title {
    font-size: 1.4rem;
  }

  a.opensource-card {
    padding: 1rem;
  }

  a.opensource-card img {
    width: 60px;
    height: 60px;
  }
}

/* ======================================= */
/* OPENSOURCE LIGHT MODE AANPASSINGEN      */
/* ======================================= */
:root.light-mode .opensource-section h1 {
  color: #0969da;
}

:root.light-mode .opensource-section .intro {
  color: #24292f;
}

:root.light-mode .opensource-section .intro b {
  color: #0969da;
}

:root.light-mode .category-title {
  color: #24292f;
  border-bottom: 2px solid #d0d7de;
}

/* Cards (light) */
:root.light-mode a.opensource-card {
  background: linear-gradient(180deg, #ffffff, #fbfcfe);
  border: 1px solid color-mix(in srgb, #0969da 10%, #d0d7de);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

:root.light-mode a.opensource-card:hover {
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12);
  border-color: #0969da;
  background: linear-gradient(180deg, #ffffff, #f6f8fa);
}

:root.light-mode a.opensource-card:hover img {
  filter: drop-shadow(0 0 10px #0969da);
}

:root.light-mode a.opensource-card:active {
  background: #eaeef2;
}

:root.light-mode a.opensource-card h3 {
  color: #0969da !important;
}

:root.light-mode a.opensource-card p {
  color: #57606a !important;
}

:root.light-mode .opensource-section .footnote {
  border-top: 1px solid #d0d7de;
  color: #57606a;
}